package com.yzh.sharding.model;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author yzh
 * @since 2019-11-04
 */
@ApiModel(value="VoucherApply对象", description="")
@TableName("t_voucher_apply")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@Builder
@Data
public class VoucherApply extends Model<VoucherApply> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "ID")
    @TableId(value = "id")
    private String id;

    @ApiModelProperty(value = "劵ID")
    @TableField("voucher_id")
    private String voucherId;

    @ApiModelProperty(value = "申请时间")
    @TableField("apply_datetime")
    private LocalDateTime applyDatetime;

    @ApiModelProperty(value = "批次状态  -1：新创建状态（券生成未完成，不能导出） 0:未激活 1:已激活 2:作废")
    @TableField("status")
    private Integer status;

    @ApiModelProperty(value = "申请人")
    @TableField("apply_person")
    private String applyPerson;

    @ApiModelProperty(value = "发劵影城 不再维护")
    @TableField("cinema_code")
    private String cinemaCode;

    @ApiModelProperty(value = "添加人")
    @TableField("create_by")
    private String createBy;

    @ApiModelProperty(value = "添加时间")
    @TableField("create_time")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "最后更新人")
    @TableField("update_by")
    private String updateBy;

    @ApiModelProperty(value = "最后更新时间")
    @TableField("update_time")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "当前申请总张数")
    @TableField("apply_num")
    private Integer applyNum;

    @ApiModelProperty(value = "批次名称")
    @TableField("apply_name")
    private String applyName;

    @ApiModelProperty(value = "备注")
    @TableField("comment")
    private String comment;

    @ApiModelProperty(value = "有效期类型1固定有效期2绑定计算过期时间")
    @TableField("expire_type")
    private Integer expireType;

    @ApiModelProperty(value = "绑定计算过期时间-有效天数")
    @TableField("expire_days")
    private Integer expireDays;

    @ApiModelProperty(value = "开始时间")
    @TableField("expire_start_time")
    private LocalDateTime expireStartTime;

    @ApiModelProperty(value = "结束时间")
    @TableField("expire_end_time")
    private LocalDateTime expireEndTime;

    @ApiModelProperty(value = "导出状态 1:未导出 2:已导出")
    @TableField("export")
    private Integer export;

    @ApiModelProperty(value = "导出时间")
    @TableField("export_time")
    private LocalDateTime exportTime;

    @ApiModelProperty(value = "导出人")
    @TableField("export_by")
    private String exportBy;

    @ApiModelProperty(value = "删除标识0:未删除 1:删除")
    @TableField("del_flag")
    @TableLogic
    private Integer delFlag;

    @ApiModelProperty(value = "是否被其他关联：null未关联1票务定向红包2购票赠送红包3限量领取红包4附近商家红包5卖品定向红包6购物赠送红包7评价送红包8积分兑券")
    @TableField("link")
    private Integer link;

    @ApiModelProperty(value = "会员关怀ID")
    @TableField("care_id")
    private String careId;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
